package com.zhiyou100.serice.Impl;

import com.zhiyou100.mapper.CourseMapper;
import com.zhiyou100.model.Course;
import com.zhiyou100.model.Speaker;
import com.zhiyou100.serice.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CourseServiceImpl implements CourseService{
    @Autowired
    private CourseMapper mapper;

    public List<Course> findAll() {
        return mapper.findAll();
    }

    public Course findById(Integer id) {
        return mapper.findById(id);
    }

    public void update(Course course) {
        mapper.update(course);
    }

    public void add(Course course) {
        mapper.add(course);
    }

    public void delete(Integer id) {
        mapper.delete(id);
    }

    public List<Course> findBySubjectId(Integer id) {
        return mapper.findBySubjectId(id);
    }
}
